<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页 - 指针平台</title>
    {% load static %}
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
    <!-- 顶部导航 -->
    <header class="header">
        <div class="container">
            <h1>指针平台</h1>
            <div class="user-info">
                <div class="avatar">
                    <i id="header-avatar-icon"
                       style="{% if user.avatar %}background-image:url('{{ user.avatar.url }}');{% else %}background-image:url('{% static 'img/default-avatar.svg' %}');{% endif %}"></i>
                </div>
                <div class="user-details">
                    <p class="user-name">{{ user.username }}</p>
                    <p class="user-role">{{ role_name }}</p>
                </div>
                <a href="{% url 'logout' %}" class="btn-logout">
                    <i class="fas fa-sign-out-alt"></i> 退出
                </a>
            </div>
        </div>
    </header>
    
    <!-- 主要内容 -->
    <main class="content">
        <div class="container">
            <!-- 欢迎卡片 -->
            <div class="welcome-card">
                <h2>欢迎回来，{{ user.username }}！</h2>
                <p>作为{{ role_name }}，您可以访问以下功能</p>
            </div>
            
            <!-- 统计卡片 -->
            <div class="stats-cards">
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-tasks"></i>
                    </div>
                    <div class="stat-value">0</div>
                    <div class="stat-label">待处理任务</div>
                </div>
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-bell"></i>
                    </div>
                    <div class="stat-value">0</div>
                    <div class="stat-label">未读通知</div>
                </div>
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-file-alt"></i>
                    </div>
                    <div class="stat-value">0</div>
                    <div class="stat-label">文件数量</div>
                </div>
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-users"></i>
                    </div>
                    <div class="stat-value">0</div>
                    <div class="stat-label">用户数量</div>
                </div>
            </div>
            
            <!-- 功能卡片 -->
            <div class="action-cards">
                <div class="action-card">
                    <div class="action-icon">
                        <i class="fas fa-robot"></i>
                    </div>
                    <h3>AI接入</h3>
                    <p>接入智能AI服务，提升工作效率</p>
                    <a href="#" class="btn btn-outline-primary">
                        立即使用
                    </a>
                </div>
                <div class="action-card">
                    <div class="action-icon">
                        <i class="fas fa-chart-bar"></i>
                    </div>
                    <h3>数据可视化</h3>
                    <p>直观展示各类数据报表和分析</p>
                    <a href="#" class="btn btn-outline-primary">
                        查看数据
                    </a>
                </div>
                <div class="action-card">
                    <div class="action-icon">
                        <i class="fas fa-search"></i>
                    </div>
                    <h3>巡检管理</h3>
                    <p>设备巡检和维护记录管理</p>
                    <a href="#" class="btn btn-outline-primary">
                        管理巡检
                    </a>
                </div>
                <div class="action-card">
                    <div class="action-icon">
                        <i class="fas fa-folder"></i>
                    </div>
                    <h3>文件管理</h3>
                    <p>上传、下载和管理各类文件资源</p>
                    <a href="#" class="btn btn-outline-primary">
                        管理文件
                    </a>
                </div>
            </div>
        </div>
    </main>
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/js/bootstrap.bundle.min.js"></script>
</body>
</html>